<script>
import Field from "./Field.vue";

export default {
  name: "App",
  components: {Field},
  data() {
    return {
      myValue: ""
    }
  },
  methods:{
    registerClick(){
      console.log(this.myValue)
    },
    resetClick(){
      this.myValue = ""
    }
  }

}
</script>

<template>
  <div>
    <field value="zhangsan" type="text" label="用户名" v-model="myValue"/>
  </div>
  <div><button @click="registerClick">注册</button></div>
  <div><button @click="resetClick">重置</button></div>
</template>

<style scoped>

</style>